#include "User.h"

User::User()
{
	id = 0;
	username.clear();
	password.clear();
	mobile.clear();
	email.clear();
	date.clear();
}

User::User(const User &user)
{
	*this = user;
}

quint32 User::getId() const
{
	return id;
}

void User::setId(const quint32 &value)
{
	id = value;
}

QString User::getUsername() const
{
	return username;
}

void User::setUsername(const QString &value)
{
	username = value;
}

QString User::getPassword() const
{
	return password;
}

void User::setPassword(const QString &value)
{
	password = value;
}

QString User::getMobile() const
{
	return mobile;
}

void User::setMobile(const QString &value)
{
	mobile = value;
}

QString User::getEmail() const
{
	return email;
}

void User::setEmail(const QString &value)
{
	email = value;
}

QString User::getDate() const
{
    return date;
}

void User::setDate(const QString &value)
{
    date = value;
}

QString User::toString() const
{
	return  "{\"id\":" + QString::number(id) +
			", \"username\":\"" + username +
			"\", \"password\":\"" + password +
			"\", \"mobile\":\"" + mobile +
			"\", \"email\":\"" + email +
			", \"date\":\"" + date + "\"}";
}
